package com.study.ui;

import java.util.Random;

public class CodeUtil {
    // 生成验证码的静态方法（示例实现）
    public static String getCode() {
        String chars = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz0123456789";
        Random random = new Random();
        StringBuilder code = new StringBuilder(4); // 生成4位验证码
        for (int i = 0; i < 4; i++) {
            code.append(chars.charAt(random.nextInt(chars.length())));
        }
        return code.toString();
    }
}
